From: Aryeh Gregor Date: Thu, 10 May 2007 01:24:51 +0000 (+0000) Subject: (bug 9860) Fix bug caused by true == 'default' (don't you love PHP?). Thanks to... X-Git-Tag: 1.31.0-rc.0~52984 X-Git-Url: http://git.cyclocoop.org/%7D%7Cconcat%7B?a=commitdiff_plain;h=7125495256c8bf80f9a3014a772fa3b9a14760c5;p=lhc%2Fweb%2Fwiklou.git (bug 9860) Fix bug caused by true == 'default' (don't you love PHP?). Thanks to Ben White/Philip. I'm not sure how to phrase this for RELEASE-NOTES since I'm not sure what it does exactly; does it only affect extension-writers or something? From looking at the code I can't even see how the execution path is ever even followed, except maybe from maintenance scripts. --- diff --git a/includes/RecentChange.php b/includes/RecentChange.php index fced434397..f01d6cc693 100644 --- a/includes/RecentChange.php +++ b/includes/RecentChange.php @@ -280,10 +280,8 @@ class RecentChange * Makes an entry in the database corresponding to page creation * Note: the title object must be loaded with the new id using resetArticleID() * @todo Document parameters and return - * @public - * @static */ - public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = "default", + public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = 'default', $ip='', $size = 0, $newId = 0 ) { if ( !$ip ) { @@ -292,7 +290,7 @@ class RecentChange $ip = ''; } } - if ( $bot == 'default' ) { + if ( $bot === 'default' ) { $bot = $user->isAllowed( 'bot' ); }